using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using Northwoods.Go;

namespace Rules.Diagram
{
    [Serializable]
    public class RuleLink : GoLabeledLink, IHighlit
    {
        public RuleLink()
        {
            this.Selectable = false;
            this.HighlightPen = new Pen(Color.Red, 5);
            this.ToArrow = true;
            this.Orthogonal = true;
            this.Style = GoStrokeStyle.RoundedLine;
            this.AvoidsNodes = true;
        }

        public override GoLink CreateRealLink()
        {
            return new ChartRealLink();
        }

        public bool Highlit
        {
            get { return this.Highlight; }
            set
            {
                this.SkipsUndoManager = true;
                this.Highlight = value;  // show or hide the HighlightPen
                this.SkipsUndoManager = false;
            }
        }
    }
}
